<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type">
    <meta charset="utf-8">
    <title>{{$data.title}} - 后台管理</title>
    <link href="{{$smarty.const.APP_URL}}templates/admin/css/admin.css" type="text/css" rel="stylesheet">
    <link href="{{$smarty.const.APP_URL}}templates/admin/js/artDialog/black.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="{{$smarty.const.APP_URL}}templates/admin/js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="{{$smarty.const.APP_URL}}templates/admin/js/jquery.cookie.js"></script>
    <script type="text/javascript" src="{{$smarty.const.APP_URL}}templates/admin/js/artDialog/jquery.artDialog.min.js"></script>
    <script type="text/javascript" src="{{$smarty.const.APP_URL}}templates/admin/js/admin.js"></script>
    <script type="text/javascript">
        var this_uri = "/admin/order/index";
    </script>
</head>
<body>

<div id="header">
    <div class="logo"><a href="/admin/"><img src="{{$smarty.const.APP_URL}}templates/admin/images/logo.png" title="后台首页"></a></div>
    <div class="loading"><div id="ajax-loader" title="Ajax数据更新中..."></div></div>
    <div id="topbar">
        <!--顶部菜单 start-->
        {{include file="{{$smarty.const.APP_PATH}}Admin/View/public/topmenu.html"}}
        <!--顶部菜单 end-->
        <!--顶部右侧 start-->
        {{include file="{{$smarty.const.APP_PATH}}Admin/View/public/topuser.html"}}
        <!--顶部右侧 end-->
        <div></div>
    </div>
</div>

<div><!-- 外层添加一个DIV解决IE8下margin-top的问题 -->
    <table id="maintable" cellpadding="0" cellspacing="0">
        <tbody><tr>
            <!--左侧菜单 start-->
            {{include file="{{$smarty.const.APP_PATH}}Admin/View/public/leftmenu.html"}}
            <!--左侧菜单 end-->
            <!--主要TD start-->
            <td class="maintd" valign="top">
                <div class="maindiv">
                    <div id="main">
                        <div class="itemtitle">
                            <h3>编辑订单</h3>
                            <ul>
                                <a class="link-btn link-live" href="/admin/order/order_edit">编辑订单</a>
                                <!--<a class="link-btn" href="/admin/order/order_add">添加订单</a>-->
                                <a class="link-btn" href="/admin/order/index">订单列表</a>
                            </ul>
                        </div>
                        <form action="/admin/order/order_edit_post" method="post" enctype="multipart/form-data">
                            <input type="hidden" name="order_id" value="{{$order_info.order_id}}"/>
                            <table class="tb">
                                <tbody>
                                <tr>
                                    <td class="tbheader" colspan="38">编辑订单信息</td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>订单编号:</b>
                                    </td>
                                    <td class="td last">
                                        {{$order_info.order_sn}}
                                    </td>
                                </tr>
                                {{if $order_info.order_type==2}}<tr>
                                    <td class="td">
                                        <b>撮合编号:</b>
                                    </td>
                                    <td class="td last">
                                        {{$order_info.match.match_sn}}
                                    </td>
                                </tr>{{/if}}
                                <tr>
                                    <td class="td">
                                        <b>卖家:</b>
                                    </td>
                                    <td class="td last">
                                        <a href="#">{{$order_info.seller_name}}</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>买家:</b>
                                    </td>
                                    <td class="td last">
                                        <a href="#">{{$order_info.buyer_name}}</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>供货信息:</b>
                                    </td>
                                    <td class="td last">
                                        <a href="#">{{$order_info.supply_title}}</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>采购信息:</b>
                                    </td>
                                    <td class="td last">
                                        <a href="#">{{$order_info.purchase_title}}</a>
                                    </td>
                                </tr>
                                {{if $order_info.order_type!=2}}<tr>
                                    <td class="td">
                                        <b>
                                            商品信息:
                                        </b>
                                        <br>
                                        买家购买的商品信息详情.
                                    </td>
                                    <td class="td last">
                                        <table style="border-bottom: solid 1px #e0dede;">
                                            <tr style="border-top: solid 1px #e0dede; border-left: solid 1px #e0dede; border-right: solid 1px #e0dede;">
                                                <td align="center" width="300">商品信息</td>
                                                <td align="center" width="100">单价</td>
                                                <td align="center" width="100">数量</td>
                                                <td align="center" width="100">价格</td>
                                            </tr>
                                            {{foreach from=$order_info.product_list item=i}}
                                            <tr style="border-top:dashed 1px #e0dede; border-left: solid 1px #e0dede; border-right: solid 1px #e0dede;">
                                                <td><a href="#" target="_blank">{{if $i.product_image}}<img src="{{$i.product_image}}" width="50" height="50">{{/if}}{{$i.product_name}}</a></td>
                                                <td align="center" width="100">¥{{$i.product_price}}</td>
                                                <td align="center" width="100">{{$i.product_num}}</td>
                                                <td align="center" width="100">¥{{$i.product_price*$i.product_num}}</td>
                                            </tr>
                                            {{/foreach}}
                                        </table>
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td class="td">
                                        <b>商品总价格:</b>
                                    </td>
                                    <td class="td last">
                                        <input type="text" size="20" value="{{$order_info.goods_amount}}" name="goods_amount">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>折扣价格:</b>
                                    </td>
                                    <td class="td last">
                                        <input type="text" size="20" value="{{$order_info.discount}}" name="discount">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>运费价格:</b>
                                    </td>
                                    <td class="td last">
                                        <input type="text" size="20" value="{{$order_info.shipping_fee}}" name="shipping_fee">
                                    </td>
                                </tr>
                                {{/if}}
                                <tr>
                                    <td class="td">
                                        <b>订单总价格:</b>
                                    </td>
                                    <td class="td last">
                                        <input type="text" size="20" value="{{$order_info.order_amount}}" name="order_amount">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>
                                            订单留言:
                                        </b>
                                        <br>
                                        用户下订单时的留言.
                                    </td>
                                    <td class="td last">
                                        <textarea style="width:292px;" rows="4" name="order_message">{{$order_info.order_message}}</textarea>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>订单生成时间:</b>
                                    </td>
                                    <td class="td last">
                                        {{$order_info.order_time|date_format:'%Y-%m-%d %H:%M:%S'}}
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>订单状态:</b>
                                    </td>
                                    <td class="td last">
                                        <select name="order_state_id">
                                            <option value="1" {{if $order_info.order_state_id==1}}selected{{/if}}>未付款</option>
                                            <option value="2" {{if $order_info.order_state_id==2}}selected{{/if}}>已付款</option>
                                            <option value="3" {{if $order_info.order_state_id==3}}selected{{/if}}>已发货</option>
                                            <option value="4" {{if $order_info.order_state_id==4}}selected{{/if}}>已收货</option>
                                            <option value="5" {{if $order_info.order_state_id==5}}selected{{/if}}>已评价</option>
                                            <option value="6" {{if $order_info.order_state_id==6}}selected{{/if}}>已完成</option>
                                        </select>
                                        <!--<font class="red">* 必填项</font>-->
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>支付方式:</b>
                                    </td>
                                    <td class="td last">
                                        <select name="payment_id">
                                            <option value="1" {{if $order_info.payment_id==1}}selected{{/if}}>银行转账</option>
                                            <option value="2" {{if $order_info.payment_id==2}}selected{{/if}}>银行汇款</option>
                                            <option value="3" {{if $order_info.payment_id==3}}selected{{/if}}>支付宝</option>
                                        </select>
                                        <!--<font class="red">* 必填项</font>-->
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>支付时间:</b>
                                    </td>
                                    <td class="td last">
                                        {{$order_info.payment_time|date_format:'%Y-%m-%d %H:%M:%S'}}
                                    </td>
                                </tr>
                                {{if $order_info.order_type!=2}}<tr>
                                    <td class="td">
                                        <b>
                                            支付留言:
                                        </b>
                                        <br>
                                        卖家付款时的留言.
                                    </td>
                                    <td class="td last">
                                        <textarea style="width:292px;" rows="4" name="pay_message">{{$order_info.pay_message}}</textarea>
                                    </td>
                                </tr>{{/if}}
                                <tr>
                                    <td class="td">
                                        <b>配送方式:</b>
                                    </td>
                                    <td class="td last">
                                        <select name="shipping_type">
                                            <option value="1" {{if $order_info.shipping_type==1}}selected{{/if}}>快递公司</option>
                                            <option value="2" {{if $order_info.shipping_type==2}}selected{{/if}}>物流公司</option>
                                            <option value="3" {{if $order_info.shipping_type==3}}selected{{/if}}>自取</option>
                                        </select>
                                        <!--<font class="red">* 必填项</font>-->
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>配送公司:</b>
                                    </td>
                                    <td class="td last">
                                        <select name="shipping_express_id">
                                            <option value="1" {{if $order_info.shipping_express_id==1}}selected{{/if}}>顺丰</option>
                                            <option value="2" {{if $order_info.shipping_express_id==2}}selected{{/if}}>圆通</option>
                                            <option value="3" {{if $order_info.shipping_express_id==3}}selected{{/if}}>申通</option>
                                        </select>
                                        <!--<font class="red">* 必填项</font>-->
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>配送时间:</b>
                                    </td>
                                    <td class="td last">
                                        {{$order_info.shipping_time|date_format:'%Y-%m-%d %H:%M:%S'}}
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>物流单号:</b>
                                    </td>
                                    <td class="td last">
                                        <input type="text" size="20" value="{{$order_info.shipping_code}}" name="shipping_code">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>
                                            收货地址邮编:
                                        </b>
                                        <br>
                                        买家的收货地址邮编.
                                    </td>
                                    <td class="td last">
                                        <input name="zip_code" type="text" size="100" value="{{$order_info.order_address.zip_code}}">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>
                                            收货地址:
                                        </b>
                                        <br>
                                        买家的收货地址.
                                    </td>
                                    <td class="td last">
                                        <input name="address" type="text" size="100" value="{{$order_info.order_address.address}}">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>
                                            收货人姓名:
                                        </b>
                                        <br>
                                        买家的收货人姓名.
                                    </td>
                                    <td class="td last">
                                        <input name="true_name" type="text" size="100" value="{{$order_info.order_address.true_name}}">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>
                                            收货人电话:
                                        </b>
                                        <br>
                                        买家的收货人电话.
                                    </td>
                                    <td class="td last">
                                        <input name="telephone" type="text" size="100" value="{{$order_info.order_address.telephone}}">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>
                                            发货备注:
                                        </b>
                                        <br>
                                        卖家发货备注.
                                    </td>
                                    <td class="td last">
                                        <textarea style="width:292px;" rows="4" name="deliver_explain">{{$order_info.deliver_explain}}</textarea>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>
                                            发票信息:
                                        </b>
                                        <br>
                                        发票信息.
                                    </td>
                                    <td class="td last">
                                        <textarea style="width:292px;" rows="4" name="invoice">{{$order_info.invoice}}</textarea>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>订单完成时间:</b>
                                    </td>
                                    <td class="td last">
                                        {{$order_info.finnshed_time|date_format:'%Y-%m-%d %H:%M:%S'}}
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>
                                            订单来源:
                                        </b>
                                        <br>

                                    </td>
                                    <td class="td last">
                                        <select name="order_from">
                                            <option value="1" {{if $order_info.order_from==1}}selected{{/if}}>PC端</option>
                                            <option value="2" {{if $order_info.order_from==2}}selected{{/if}}>手机端</option>
                                        </select>
                                    </td>
                                </tr>
                                <!--以下部分可视情况制作--
                                <tr>
                                    <td class="td">
                                        <b>订单赠送积分:</b>
                                    </td>
                                    <td class="td last">
                                        <input type="text" size="20" value="{{$order_info.order_pointscount}}" name="order_pointscount">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>
                                            代金券:
                                        </b>
                                        <br>

                                    </td>
                                    <td class="td last">
                                        <select name="voucher_id">
                                            <option value="1" {{if $order_info.voucher_id==1}}selected{{/if}}>金猪代金券</option>
                                            <option value="2" {{if $order_info.voucher_id==2}}selected{{/if}}>金猴代金券</option>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>代金券面额:</b>
                                    </td>
                                    <td class="td last">
                                        <input type="text" size="20" value="{{$order_info.voucher_price}}" name="voucher_price">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>代金券编码:</b>
                                    </td>
                                    <td class="td last">
                                        <input type="text" size="40" value="{{$order_info.voucher_code}}" name="voucher_code">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>
                                            退款状态:
                                        </b>
                                        <br>

                                    </td>
                                    <td class="td last">
                                        <select name="voucher_id">
                                            <option value="1" {{if $order_info.refund_state==1}}selected{{/if}}>无退款</option>
                                            <option value="2" {{if $order_info.refund_state==2}}selected{{/if}}>部分退款</option>
                                            <option value="3" {{if $order_info.refund_state==3}}selected{{/if}}>全部退款</option>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>退款金额:</b>
                                    </td>
                                    <td class="td last">
                                        <input type="text" size="20" value="{{$order_info.refund_amount}}" name="refund_amount">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>
                                            退货状态:
                                        </b>
                                        <br>

                                    </td>
                                    <td class="td last">
                                        <select name="return_state">
                                            <option value="1" {{if $order_info.return_state==1}}selected{{/if}}>无退货</option>
                                            <option value="2" {{if $order_info.return_state==2}}selected{{/if}}>部分退货</option>
                                            <option value="3" {{if $order_info.return_state==3}}selected{{/if}}>全部退货</option>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>退货数量:</b>
                                    </td>
                                    <td class="td last">
                                        <input type="text" size="20" value="{{$order_info.return_num}}" name="return_num">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>评价状态</b>
                                        <br>

                                    </td>
                                    <td class="td last">
                                        <input type="radio" {{if $order_info.evaluation_status==1}}checked="checked"{{/if}} value="1" name="evaluation_status">已评价
                                        <input type="radio" {{if $order_info.evaluation_status==2}}checked="checked"{{/if}} value="2" name="evaluation_status">未评价
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>评价时间:</b>
                                    </td>
                                    <td class="td last">
                                        {{$order_info.evaluation_time|date_format:'%Y-%m-%d %H:%M:%S'}}
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>卖家是否已评价买家</b>
                                        <br>

                                    </td>
                                    <!--稍后修改--
                                    <td class="td last">
                                        <input type="radio" {{if $order_info.evalseller_status==1}}checked="checked"{{/if}} value="1" name="evalseller_status">已评价
                                        <input type="radio" {{if $order_info.evalseller_status==2}}checked="checked"{{/if}} value="2" name="evalseller_status">未评价
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>评价时间:</b>
                                    </td>
                                    <td class="td last">
                                        {{$order_info.evalseller_time|date_format:'%Y-%m-%d %H:%M:%S'}}
                                    </td>
                                </tr>-->
                                </tbody>
                            </table>
                            <div class="submit">
                                <input class="save" type="submit" value="提交" name="save">
                            </div>
                        </form>
                        <!--底部信息 start-->
                        {{include file="{{$smarty.const.APP_PATH}}Admin/View/public/sysinfo.html"}}
                        <!--底部信息 end-->
                    </div>
                </div>
            </td>
            <!--主要TD end-->
        </tr>
        </tbody></table>
</div>

<script type="text/javascript">
    jQuery(document).ready(function() {
        //调整高度
        $("#container").height($(window).height()-40);
        $(window).resize(function() {
            $("#container").height($(window).height()-40);
        });

        App.init();//左侧菜单初始化

        var a101 = $("#topbar"); //顶部下接菜单
        a101.find("dl").Jdropdown({delay: 0}, function(a){});

        //全选checkbox
        $("#checkAll").click(function(e){
            $("input[name='" + $(this).attr("for") + "']").attr("checked", this.checked);
        });
    });
</script>
</body>
</html>